OPC Studio User's Guide and Reference
Subscribe & Write
Concepts > OPC Data Client Concepts > OPC Data Client Development Models > Live Binding Model > Live Binding Model for OPC Data (Classic and UA) > Typical Binding Scenarios > Subscribe & Write

A control can reflect OPC value changes, and also write the updated values to the OPC server when modified by the user. For example, you can bind a TrackBar and a NumericUpDown controls to the same OPC item, and they will influence each other through OPC.

How to configure this feature:

On the target control, use "Bind to Point" command and select the OPC-DA item (or OPC-UA node) you want to bind to.

Then, use the "Edit Live Bindings" command, and for BindingOperations property, add a check next to the Write operation. In order to have the Write invoked when the control changes, set the WriteEventSource.SourceComponent to your control; the SourceMember of the WriteEventSource will be automatically determined, but you can change it, if you want to link to a different event.

Note: In OPC-DA, some controls will require you to set the ItemDescriptor.RequestedDataType so that the OPC value type matches the type of the target property.

Note: In OPC-UA, some controls or OPC-UA servers will require you to set the ValueTypeCode (under the WriteParameters property) so that the OPC-UA value type matches the type of the target property. It is also recommended to set the ValueTypeCode for performance reasons.

See Also